﻿package com.toncen.samepms.basic.dao;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.toncen.samepms.basic.domain.ProcessLog;
import com.toncen.samepms.common.AbstractDao;

/**
 * 描述：流程操作日志表BASIC_PROCESS_LOG的dao文件
 * 
 * @author tch
 */
public class ProcessLogDao extends AbstractDao<ProcessLog> {

	public ProcessLogDao() {
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.comit.common.db.BaseDao#initialize()
	 */
	@Override
	protected void initialize() {
		setStatementPrefix("ProcessLog");
		setStatementDivision(".");
	}

	/**
	 * 
	 * create:zq
	 * <p>
	 * create date:Oct 30, 20131:59:28 PM
	 * <p>
	 * 类名：ProcessLogDao.java
	 * <p>
	 * 方法描述： 返回对应实体类的操作记录
	 * 
	 * @param domainClass
	 * @param domainId
	 * @return
	 * @throws SQLException
	 */
	public List<ProcessLog> getByDomain(String domainClass, long domainId)
			throws SQLException {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("domainClass", domainClass);
		map.put("domainId", domainId);
		return getSqlMap().queryForList(getStatement("getByDomain"), map);
	}
}
